﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Threading;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //App_code中类
        SynchronValue sv = new SynchronValue();
        sv.Resp = Page.Response;//将页面的Response对象传入SynchronValue类
        //五个线程同步测试
        for (int i = 0; i < 5; i++)
        {
            Thread thrd = new Thread(sv.DoWork);
            thrd.Start();//开启线程
        }
        Thread.Sleep(1000);//休眠1秒钟,保证所有的内容都已输出到页面

    }

}
